home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
C++
/
Code Resources
/
Windows 95 MDEF
/
Sourcery
/
WinFun95
/
Win95Look.h
< prev
Wrap
Text File
|
1996-06-12
|
3KB
|
133 lines
#ifndef WIN95LOOK_H_
#define WIN95LOOK_H_
/*
Ack! Routines which give your Mac a distinct Windows95 look!
Blasphemy! Heretic!
Written by Hiep Dam.
Version 1.0
From The Witches' Brew
Created: Dec 3 95
Version history:
6/12/96 1.01 Cleaned up interfaces.
*/
#ifdef __cplusplus
extern "C" {
#endif
// ---------------------------------------------------------------------------
/***** Windows 95 text drawing routines *****/
/*
The text-drawing routines give the text an "embossed look". The routine
uses two colors to get an embossed look. You will want the <embossColor>
to be lighter than <textColor> for the standard embossed effect.
These routines save whatever GrafPort variables they set, with the
exception of the penLoc.
Before calling these routines you should first set the destination port
via SetPort(), and set the following to what you want:
- textFont
- textSize
- textFace
The textMode for these routines is always srcOr.
*/
// Draw one char
void W95DrawChar(
char theChar,
const RGBColor *textColor,
const RGBColor *embossColor);
// Draw a string. Note: does not use pascal or c strings.
void W95DrawText(
char *text, // Pointer to first char of string
unsigned short length,
const RGBColor *textColor,
const RGBColor *embossColor);
// Similar to above, put you specify an explicit drawing location.
void W95DrawTextAt(
char *text,
unsigned short length,
short h,
short v,
const RGBColor *textColor,
const RGBColor *embossColor);
// ---------------------------------------------------------------------------
/*
Line and rect drawing routines. Creates a 3D effect by using the
line and hilite colors. <hiliteColor> should be lighter than
<lineColor>.
These routines also save the GrafPort variables with the exception
of the penLoc.
*/
void W95LineTo(
short h,
short v,
const RGBColor *lineColor,
const RGBColor *hiliteColor);
void W95DrawRect(
const Rect *frame,
const RGBColor *lineColor,
const RGBColor *hiliteColor);
// ---------------------------------------------------------------------------
/*
These routines draw a right-pointing and a downward-pointing
triangle. There are two different looks involved, depending
on whether <exactWin95Look> is true or false...
How the parameters are used depends on <exactWin95Look>.
If true, all three RGBColors are used.
If false, only <lineColor> and <hiliteColor> are used, and
drawn in a 3D fashion. <hiliteColor> should be lighter than
<lineColor>. <fillColor> is not used.
Confused yet?
*/
void W95DrawTriangleRight(
const Rect *triangleBounds,
Boolean exactWin95Look,
const RGBColor *lineColor,
const RGBColor *hiliteColor,
const RGBColor *fillColor);
void W95DrawTriangleDown(
const Rect *triangleBounds,
Boolean exactWin95Look,
const RGBColor *lineColor,
const RGBColor *hiliteColor,
const RGBColor *fillColor);
// ---------------------------------------------------------------------------
void W95DrawEmbossedButton(
const Rect *btnRect,
Boolean pushedIn,
const RGBColor *baseColor,
const RGBColor *hiliteColor,
const RGBColor *shadowColor,
const RGBColor *frameColor); // optional; if NULL, black is used.
// ---------------------------------------------------------------------------
#ifdef __cplusplus
}
#endif
#endif // WIN95LOOK_H_